
TARGETS_F031 := REF_F031\

HAL_FOLDER_F031 := $(HAL_FOLDER)/f031

MCU_F031 := -mcpu=cortex-m0 -mthumb
LDSCRIPT_F031 := $(HAL_FOLDER_F031)/STM32F031C6TX_FLASH.ld

SRC_DIR_F031 += \
	$(HAL_FOLDER_F031)/Startup \
	$(HAL_FOLDER_F031)/Src \
	$(HAL_FOLDER_F031)/Drivers/STM32F0xx_HAL_Driver/Src

CFLAGS_F031 := \
	-I$(HAL_FOLDER_F031)/Inc \
	-I$(HAL_FOLDER_F031)/Drivers/STM32F0xx_HAL_Driver/Inc \
	-I$(HAL_FOLDER_F031)/Drivers/CMSIS/Include \
	-I$(HAL_FOLDER_F031)/Drivers/CMSIS/Device/ST/STM32F0xx/Include

CFLAGS_F031 += \
	-DHSE_VALUE=8000000 \
	-DSTM32F031x6 \
	-DHSE_STARTUP_TIMEOUT=100 \
	-DLSE_STARTUP_TIMEOUT=5000 \
	-DLSE_VALUE=32768 \
	-DDATA_CACHE_ENABLE=0 \
	-DINSTRUCTION_CACHE_ENABLE=0 \
	-DVDD_VALUE=3300 \
	-DLSI_VALUE=40000 \
	-DHSI_VALUE=8000000 \
	-DUSE_FULL_LL_DRIVER \
	-DPREFETCH_ENABLE=1

SRC_F031 := $(foreach dir,$(SRC_DIR_F031),$(wildcard $(dir)/*.[cs]))
